# $Id: PKGBUILD 89849 2013-05-03 13:35:22Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Felipe Hommen <felibank at gmail dot com>
# Contributor: moostik <mooostik_at_gmail.com>

pkgname=geogebra
pkgver=4.2.36.0
pkgrel=1
pkgdesc='Dynamic mathematics software with interactive graphics, algebra and spreadsheet'
arch=('any')
url='http://www.geogebra.org/'
license=('GPL3' 'CCPL:by-sa')
depends=('java-runtime' 'shared-mime-info' 'hicolor-icon-theme' 'desktop-file-utils' 'xdg-utils')
install=geogebra.install
source=(http://$pkgname.googlecode.com/files/GeoGebra-Unixlike-Installer-$pkgver.tar.gz)
sha256sums=('2e5f9e9bbf03154d1f04fb69c071e61e54a0a99ae80bba4fc80768ce02646a94')

package() {
  install -dm755 $pkgdir/usr/bin \
                 $pkgdir/usr/share/applications \
                 $pkgdir/usr/share/geogebra

  cd $srcdir/$pkgname-$pkgver
  sed -i 's/\/usr/\$\{pkgdir\}\/usr/g' install.sh
  source install.sh
  install -Dm644 _license.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE

  rm -rf $pkgdir/usr/share/mime/
}
